//
//  MCQiPaiReportTool.m
//  LDYL
//
//  Created by MC on 2018/8/8.
//  Copyright © 2018年 TLYL01. All rights reserved.
//

#import "MCQiPaiReportTool.h"

@implementation MCQiPaiReportTool
//(0,0) (1,0)
//(0,1) (1,1)
//(0,2) (1,2)
//(0,3) (1,3)
//(0,4) (1,4)

/*
 * 获取Frame 第一个 【】
 */
+(CGRect)getFirstFrameWithPointX:(NSInteger)point_X andPointY:(NSInteger)point_Y{
    
    
    CGFloat H = 30;
    CGFloat L = 70;
    
    CGFloat W = (G_SCREENWIDTH-60)/2.0-22-L;
    
    CGFloat X = 0, Y = 0 ,WWidth = 0,HHeight = 0;
    
    X = 22;
    
    WWidth = W;
    HHeight = H;
    
    if (point_X==0) {
        X = 22;
    }else{
        X = (G_SCREENWIDTH-60)/2.0;
    }
    
    NSInteger K = point_Y;
    
    Y = 10+K*H;
    
    return CGRectMake(X, Y, WWidth, HHeight);
    
}


/*
 * 获取Frame 第二个 【】
 */
+(CGRect)getSecondFrameWithPointX:(NSInteger)point_X andPointY:(NSInteger)point_Y{
    
    
    CGFloat H = 30;
    CGFloat L = 70;
    
    CGFloat W = (G_SCREENWIDTH-60)/2.0-22-L;
    
    CGFloat X = 0, Y = 0 ,WWidth = 0,HHeight = 0;
    
    X = 22;
    
    WWidth = W;
    HHeight = H;
    
    if (point_X==0) {
        X = 22;
    }else{
        X = (G_SCREENWIDTH-60)/2.0;
    }
    X = X+L;
    NSInteger K = point_Y;
    Y = 10+K*H;
    
    return CGRectMake(X, Y, WWidth, HHeight);
    
}

/*
 * 获取Frame  tag从0开始
 */
+(CGRect)getFrameWithTag:(NSInteger)tag andIsLeft:(BOOL)isLeft andIsFirst:(BOOL)isFirst{
    
    CGFloat H = 30;
    CGFloat L = 70;
    
    CGFloat W = (G_SCREENWIDTH-60)/2.0-22-L;
    
    CGFloat X = 0, Y = 0 ,WWidth = 0,HHeight = 0;
    
    if (isLeft) {
        X = 22;
    }else{
        X = (G_SCREENWIDTH-60)/2.0;
    }
    if (isFirst) {
        WWidth = L;
        HHeight = H;
    }else{
        X = X+L;
        
        WWidth = W;
        HHeight = H;
    }
    
    NSInteger K = tag/2;
    
    Y = 10+K*H;
    
    return CGRectMake(X, Y, WWidth, HHeight);
    
}


+(CGFloat)getHeightWithLineCount:(NSInteger)Line_Count{
    return 50+20+30*Line_Count+15;
}

@end




































